import Vue from 'vue'
import VueRouter from 'vue-router'
import { factorylist } from './FactoryEnergy/index'
import { PrepaidList } from './prepaid/index'
import { Photovoltaiclist } from './Photovoltaic/index'
import { AuxiliaryAnalysislist } from './Intelligence-maintenance/Auxiliary-analysis/index'
import { Devicemanagementlist } from './Intelligence-maintenance/Device-management'
import { MicrogridList } from './Microgrid/index'
import { Powerqualitylist } from './Intelligence-maintenance/Power-quality/index.js'
import { statisticslist } from './statistics/index'
import { systemList } from './system/index'
import { ElectricalDistributionlist } from './ElectricalDistribution/index'
import { PatrolSituationList } from './patrol-situation/index'
import { DefectSituationList } from './defect-situation/index'
import { DistributionList } from './Distribution/index'
Vue.use(VueRouter)

const routes = [
  // 历史报警
  { path: '/', component: () => import('@/views/userscreen/index.vue') },
  // 实时报警
  {
    path: '/realtime',
    component: () => import('../views/realtime/index.vue'),
    meta: {
      title: '实时告警'
    }
  },
  {
    path: '/realtimes',
    component: () => import('@/views/realtime/jiankongliu.vue'),
    meta: {
      title: '设备监控'
    }
  },
  // 设备监控
  { path: '/monitor', component: () => import('../views/monitor/index.vue') },
  {
    path: '/MBMmonitor/:treeModel',
    // path: '/MBMmonitor',
    component: () => import('../views/MBMmonitor/index.vue')
  },
  // iot设备维护
  { path: '/iot', component: () => import('../views/iot/index.vue') },
  // 电价配置方案
  {
    path: '/configure',
    component: () => import('../views/configure/index.vue')
  },
  // 告警订阅
  {
    path: '/subscribe',
    component: () => import('@/views/subscribe/index.vue')
  },
  // 企业logo配置
  { path: '/logo', component: () => import('../views/logo/index.vue') },
  // 客户档案配置
  {
    path: '/customerFile',
    component: () => import('../views/customerFile/index.vue')
  },
  // 视频监控
  {
    path: '/surveillance',
    component: () => import('../views/surveillance/index.vue')
  },
  // 视频监控浏览
  {
    path: '/surveillance-view/:id',
    component: () => import('../views/surveillance-view/index.vue')
  },
  // token信息维护
  {
    path: '/videoConfig',
    component: () => import('../views/videoConfig/index.vue')
  },
  // 巡视作业报告
  {
    path: '/inspection',
    component: () => import('@/views/inspection/index.vue')
  },
  // 巡视作业报告/浏览页
  {
    path: '/browse/:id?',
    component: () => import('@/views/inspection/LiuLanye.vue')
  },
  // 巡视作业指导书
  {
    path: '/guidelines',
    component: () => import('@/views/guidelines/index.vue')
  },
  // 巡视周期/计划
  { path: '/cycle', component: () => import('@/views/cycle/index.vue') },
  // 巡视工单
  {
    path: '/workorder',
    component: () => import('@/views/workorder/index.vue')
  },
  // 管理权限
  {
    path: '/permissions',
    component: () => import('@/views/permissions/index.vue')
  },
  // 短信模板配置
  {
    path: '/SMStemplate',
    component: () => import('@/views/SMStemplate/index.vue')
  },
  // 用电潮流
  {
    path: '/powerFlow',
    component: () => import('@/views/powerFlow/index.vue')
  },
  // 短信应用配置
  { path: '/SMSuse', component: () => import('@/views/SMSuse/index.vue') },
  // 计算公式
  { path: '/formula', component: () => import('@/views/Formula/index.vue') },
  // 设备监控/设备报警集合 打包=>/core/statistics/route.html
  {
    path: '/tabarpolise',
    component: () => import('@/views/tabarpolise/index.vue')
  },
  // 设备台账维护
  {
    path: '/Ledger/:treeModel',
    component: () => import('@/views/Ledger/index.vue')
  },
  // 设备台账维护2
  { path: '/Ledger2', component: () => import('@/views/Ledger2/index.vue') },
  // 设备台账维护3
  { path: '/Ledger3', component: () => import('@/views/Ledger3/index.vue') },
  // 设备台账维护四川
  {
    path: '/LedgerSC/:treeModel',
    component: () => import('@/views/LedgerSC/index.vue')
  },
  // 业务版本类型
  {
    path: '/version',
    component: () => import('@/views/Business-version/index.vue')
  },
  { path: '/SMSuse', component: () => import('@/views/SMSuse/index.vue') },
  // 月度/年度诊断报告
  { path: '/Report', component: () => import('@/views/Report/index.vue') },
  // 用电诊断数据录入
  {
    path: '/diagnoseData',
    name: 'diagnoseData',
    component: () => import('@/views/diagnoseData/index.vue')
  },
  // 台账维护浏览页面
  {
    path: '/Ledger-view/:entityId/:className',
    component: () => import('@/views/Ledger-view/index.vue')
  },
  // 公司注册
  {
    path: '/companyRegister',
    component: () => import('@/views/companyRegister/index.vue')
  },
  // 客户潮流配置
  { path: '/fileFlow', component: () => import('@/views/fileFlow/index.vue') },
  // 实验报告=>实验项目配置
  {
    path: '/ProjectConfiguration',
    component: () =>
      import('@/views/Experimental-report/Project-Configuration/index.vue')
  },
  // 实验报告=>试验主信息维护
  {
    path: '/MainInformation',
    component: () =>
      import('@/views/Experimental-report/Main-information/index.vue')
  },
  // 业务模型=>模型域
  {
    path: '/Model-domain',
    component: () => import('@/views/Model-all/Model-domain/index.vue')
  },
  // 业务模型=>模型树
  {
    path: '/Model-tree',
    component: () => import('@/views/Model-all/Model-tree/index.vue')
  },
  // 设备模型=>设备域维护
  {
    path: '/Device-domain',
    component: () => import('@/views/Device-all/Device-domain/index.vue')
  },
  // 设备模型=>设备模型维护
  {
    path: '/Device-model',
    component: () => import('@/views/Device-all/Device-model/index.vue')
  },
  // 业务模型=>业务模型管理
  {
    path: '/Model-business',
    component: () => import('@/views/Model-all/Model-business/index.vue')
  },
  // APP管理=>APK控制
  {
    path: '/App-control',
    component: () => import('@/views/App-control/index.vue')
  },
  ...PrepaidList,
  ...factorylist,
  ...Photovoltaiclist,
  ...AuxiliaryAnalysislist,
  ...Devicemanagementlist,
  ...MicrogridList,
  ...systemList,
  ...statisticslist,
  ...Powerqualitylist,
  ...ElectricalDistributionlist,
  ...PatrolSituationList,
  ...DefectSituationList,
  ...DistributionList
]
const router = new VueRouter({
  routes
})

export default router
